<?php


namespace app\crm\validate;


use think\Validate;

/**
 * Class Article
 * @package app\admin\validate
 */
class TransferShop extends Validate
{

    /**
     * 验证规则
     * @var string[]
     */
    protected $rule = [
        'customer_id' => 'require|number|gt:0',
        'in_shop_id'  => 'require|number|gt:0',
        'reason'      => 'require|max:200',
    ];

    /**
     * 错误信息
     * @var string[]
     */
    protected $message = [
        'customer_id.require' => '请选择客户',
        'customer_id.number'  => '请选择客户',
        'customer_id.gt'      => '请选择客户',
        'in_shop_id.require'  => '请选择转入店铺',
        'in_shop_id.number'   => '请选择转入店铺',
        'in_shop_id.gt'       => '请选择转入店铺',
        'reason.require'      => '请填写转入原因',
        'reason.max'          => '转入原因最多200个字符'
    ];

    /**
     * 验证场景
     * @var string[]
     */
    protected $scene = [
        'create' => ['customer_id', 'in_shop_id', 'reason']
    ];

}